﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="deviceDetail.aspx.cs" Inherits="qy_54tss_Admin_deviceDetail" %>

<%@ Register Src="~/Admin/Banner.ascx" TagName="TogoBanner" TagPrefix="uc1" %>
<%@ Register Src="~/Admin/Foot.ascx" TagName="Foot" TagPrefix="uc2" %>
<%@ Register Src="~/Admin/Adleft.ascx" TagName="left" TagPrefix="uc3" %>
<%@ Register TagPrefix="epc" Namespace="Hangjing.Control" Assembly="Hangjing.Control" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>物料详情-<%=  WebUtility.GetMyName() %></title>
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../css/menu.css" rel="stylesheet" type="text/css" />
    <link href="../css/boxes.css" rel="stylesheet" type="text/css" />
    <link href="../css/Validator.css" rel="stylesheet" type="text/css" />
    <link href="../css/divDialog.css" rel="stylesheet" type="text/css" />
    <link href="../css/Common.css" rel="stylesheet" type="text/css" />
    <link href="../css/building.css" rel="stylesheet" type="text/css" />
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="../css/iestyles.css" media="all" />
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/below_ie7.css" media="all" />
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/ie7.css" media="all" />
    <![endif]-->

    <script type="text/javascript" src="../javascript/DatePicker/WdatePicker.js"></script>

    <script src="../javascript/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../javascript/Common.js" type="text/javascript"></script>

    <script src="../javascript/ScollTop.js" type="text/javascript"></script>

    <script src="../javascript/ShowDivDialog.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">

        $(window).load(function () { $("#loading-mask").hide(); });
        function reset() {
            var list = document.getElementsByName("invalue");
            for (var i = 0; i < list.length; i++) {
                list.item(i).value = "";
            }
        }

        //给一个输入框赋值
        function SetValue(objectName, objectValue) {
            $("#" + objectName + "").val(objectValue);
        }

    </script>

    <script language="javascript" type="text/javascript">

        function GotoADList() {
            window.location.href = "deviceList.aspx";
        }

        function AddGift() {
            window.location.href = "deviceDetail.aspx";

        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <!--加载中显示的div-->
        <div id="loading-mask">
            <p class="loader" id="loading_mask_loader">
                <img src="../images/ajax-loader-tr.gif" alt="加载中..." /><br />
                请等待...
            </p>
        </div>
        <epc:Hint ID="Hint1" runat="server" HintImageUrl="images/Control" />
        <div class="wrapper">
            <!--banner start-->
            <uc1:TogoBanner runat="server" ID="Banner" />
            <!--banner end-->
            <!--center start-->
            <div class="middle" id="anchor-content">
                <div id="page:main-container">
                    <div class="columns ">
                        <div class="side-col" id="page:left">
                            <uc3:left runat="server" ID="left" />
                        </div>
                        <div class="main-col" id="content">
                            <asp:ScriptManager ID="ScriptManager1" runat="server">
                            </asp:ScriptManager>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <div class="main-col-inner">
                                        <div id="divMessages">
                                        </div>
                                        <div style="visibility: visible;" class="content-header">
                                            <h3 class="icon-head head-customer">
                                                <asp:Label runat="server" ID="pageType"></asp:Label></h3>
                                            <div style="width: 0px; height: 17px;" class="content-buttons-placeholder">
                                                <p style="" class="content-buttons form-buttons">
                                                    <button type="button" class="scalable back" onclick='GotoADList()' style="margin-bottom: 0; float: left; margin-right: 3px;">
                                                        <span>返回列表</span></button>
                                                    <asp:Button ID="btSave" runat="server" CssClass="button_1" OnClick="btSave_Click"
                                                        Text="保存"></asp:Button>
                                                </p>
                                            </div>

                                        </div>
                                        <!--start-->
                                        <div class="entry-edit">


                                            <div class="entry-edit-head">
                                                <h4 class="icon-head head-billing-address">装备信息</h4>
                                            </div>
                                            <fieldset class="np">
                                                <div class="order-address" id="order-billing_address_fields">
                                                    <div class="content">
                                                        <div class="hor-scroll">
                                                            <table class="form-list" cellspacing="0">
                                                                <tbody>

                                                                    <tr>
                                                                        <td class="label">
                                                                            <label for="_accountfirstname">
                                                                                城市<span class="required">*</span></label>
                                                                        </td>
                                                                        <td class="value">
                                                                            <asp:DropDownList runat="server" ID="tbcityid" class="choicelist form-control choicelist_js check_js medium" AppendDataBoundItems="true">
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                        <td>
                                                                            <small>&nbsp;</small>
                                                                        </td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td class="label">
                                                                            <label for="_accountprefix">
                                                                                名称<span class="required">*</span></label>

                                                                        </td>
                                                                        <td class="value">
                                                                            <epc:TextBox runat="server" ID="tbtitle" class=" required-entry required-entry input-text"></epc:TextBox>
                                                                        </td>
                                                                        <td>
                                                                            <small>&nbsp;</small>
                                                                        </td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td class="label">
                                                                            <label for="_accountprefix">
                                                                                编号(唯一)<span class="required">*</span></label>

                                                                        </td>
                                                                        <td class="value">
                                                                            <epc:TextBox runat="server" ID="tbdevNO" onblur="validShopAccount()" CanBeNull="必填" class=" required-entry required-entry input-text"></epc:TextBox><label id="lbaccountnotice" style="color: red;"></label>
                                                                        </td>
                                                                        <td>
                                                                            <small>&nbsp;</small>
                                                                        </td>
                                                                    </tr>

                                                                    <tr>
                                                                        <td class="label">
                                                                            <label for="_accountfirstname">
                                                                                分类<span class="required">*</span></label>
                                                                        </td>
                                                                        <td class="value">
                                                                            <asp:DropDownList runat="server" ID="tbsortid">
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                        <td>
                                                                            <small>&nbsp;</small>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="label">
                                                                            <label for="_accountfirstname">
                                                                                计量单位<span class="required">*</span></label>
                                                                        </td>
                                                                        <td class="value">
                                                                            <asp:DropDownList runat="server" ID="tbunit">
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                        <td>
                                                                            <small>&nbsp;</small>
                                                                        </td>
                                                                    </tr>


                                                                    <tr>
                                                                        <td class="label">
                                                                            <label for="_accountfirstname">
                                                                                单价<span class="required"></span></label>
                                                                        </td>
                                                                        <td class="value">
                                                                            <epc:TextBox runat="server" ID="tbprice" Text="0" style="width:90px" RequiredFieldType="数据校验" CanBeNull="必填" class=" required-entry required-entry input-text"></epc:TextBox>
                                                                        </td>
                                                                        <td>
                                                                            <small>&nbsp;</small>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class=" left_td">备注
                                                                        </td>
                                                                        <td class="value">
                                                                            <epc:TextBox runat="server" ID="tbintro" Width="290px" TextMode="MultiLine" Height="50"
                                                                                class="required-entry input-text"></epc:TextBox>
                                                                        </td>
                                                                        <td>
                                                                            <small>&nbsp;</small>
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                    </div>
                                                </div>
                                            </fieldset>


                                        </div>
                                        <!--end-->
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                </div>
            </div>
            <!--foot start-->
            <uc2:Foot runat="server" ID="FootUC" />
            <!--foot end-->
        </div>
        <div style="display: none; left: 526px; top: 236px;" id="address_drop">
        </div>
        <div id="divShowContent" style="display: none;">
            您可以继续进行的操作<br />
            <ul class="divnotice">
                <li>
                    <button type="button" class="scalable " onclick="AddGift()" style="">
                        <span>继续添加配送员</span></button></li>
                <li>
                    <button type="button" class="scalable " onclick='GotoADList()' style="">
                        <span>回到配送员列表</span></button></li>
            </ul>
        </div>
    </form>
</body>
</html>
<script type="text/javascript">
    //判断商家帐号是否可用
    function validShopAccount() {
        var account = $("#tbdevNO").val();
        if (account == "") {
            alert("请输入编号");
            return;
        }
        var shopid = Request("id");
        if (shopid == "") {
            shopid = "0";
        }
        jQuery.ajax(
        {
            type: "post",
            cache: false,
            url: "/ajaxHandler.ashx",
            data: "method=validDeviceSn&shopid=" + shopid + "&account=" + account,
            success: function (msg) {
                if (msg != "1") {
                    $("#lbaccountnotice").html("此编号已经存在");
                }
                else {
                    $("#lbaccountnotice").html("");
                }


            }
        })

    }


</script>
